{\rtf1\mac\ansicpg10000\cocoartf100
{\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fswiss\fcharset77 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\ql\qnatural

\f0\b\fs36 \cf0 SimpleBrowser\
\
\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\ql\qnatural

\f1\b0\fs24 \cf0 SimpleBrowser is a little application which show how to use the Cocoa NSBrowser class.  The application implements a file system browser using NSBrowser as the display mechanism.  The browser lets you navigate the file system, and launch and open documents and applications.  This sample code demonstrates:\
\
	\'a5 How to display simple data in a browser\
	\'a5 Using a custom NSBrowserCell subclass for display.\
	\'a5 Filling a browser using the "lazy" delegation style.\
	\'a5 Other simple NSBrowser features (eg. handling single click actions).\
\
\
\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\ql\qnatural

\f0\b\fs28 \cf0 Major source files and what's interesting about them:\
\
AppController.m\
\
\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\ql\qnatural

\f1\b0\fs24 \cf0 The AppController object is the delegate of the 
\f0\b fsBrowser
\f1\b0  object.  A browser delegate must implement 
\f0\b browser:willDisplayCell:atRow:column:
\f1\b0  and either of the methods 
\f0\b browser:numberOfRowsInColumn:
\f1\b0  or 
\f0\b browser:createRowsForColumn:inMatrix:
\f1\b0 .   Our AppController implements 
\f0\b browser:numberOfRowsInColumn:
\f1\b0 , and thus 
\f0\b fsBrowser
\f1\b0  lazily loads it's data.  Since loading a cell in the browser involves touching the disk, it seems appropriate for the browser to be lazy.  \
\
AppController sets the single/double click actions of the browser to be 
\f0\b browserSingleClick:
\f1\b0 , and 
\f0\b browserDoubleClick:
\f1\b0  respectively.  When a single click is received the browser displays information about the current selection.  A double click on a file will open the file, while a double click on an application result in a launch of the program.\
\
\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\ql\qnatural

\f0\b \cf0 \
\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\ql\qnatural

\fs28 \cf0 FSBrowserCell.m\
\
\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\ql\qnatural

\f1\b0\fs24 \cf0 A subclass of NSBrowser cell that displays both an icon and file name given a FSNodeInfo object.\
\
\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\ql\qnatural

\f0\b\fs28 \cf0 \
FSNodeInfo.m\
\
\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\ql\qnatural

\f1\b0\fs24 \cf0 Maintains information about a single file system node, wether it is a file or directory.   In particular, FSNodeInfo can return a files absolute path, last path component, read accessibility, etc.\
}